<?php

include_once 'StringExpression.php';

class HereDocStringExpression extends StringExpression
{

    public function __construct($value = '', $Identifier = 'EOD')
    {
        parent::__construct($value);
        
        $this->set_Identifier($Identifier);
    }
    
    
    public function __set($name, $value)
    {
        parent::__set($name, $value);
        
        if($name == 'Identifier')
        {
            $this->set_Identifier($value);
        }
    }
    
    public function __get($name)
    {
        $ret = parent::__get($name);
        
        if($ret != null)
        {
            return $ret;
        }
        
        if($name == 'Identifier')
        {
            return $this->get_Identifier();
        }
    }
    
    public function get_Identifier()
    {
        return $this->Identifier;
    }

    public function set_Identifier($Identifier)
    {
        if(is_string($Identifier))
        {
            $this->Identifier = $Identifier;
        }
        else 
        {
            throw new InvalidArgumentException(
                'The identifier should be a string');
        }
    }

    private $Identifier;
}

?>
